package com.mrart.service;

import java.util.List;
import java.util.Map;
import java.util.Set;

import com.mrart.entity.Authorization;

public interface AuthorizationService {

    Authorization findOne(Long authorizationId);

    List<Authorization> findAll();

    Authorization findByAppUser(Map<String, Object> authorizationCondition);

    /**
     * 根据用户名查找其角色
     * @param username
     * @return
     */
    Set<String> findRoles(String appKey, String username);

    /**
     * 根据用户名查找其权限
     * @param username
     * @return
     */
    Set<String> findPermissions(String appKey, String username);

}